{template Public:Page:header}
<div class="container">
  <div class="row"> 
  {template Member:Index:sidebar}
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
        <div class="well">
         <div class="row"><div class="col-lg-10"><h3>站内消息</h3></div><div class="col-lg-2 text-right">
         
         <a href="javascript:void(0);" class="btn btn-info" onclick="dialogmessage()"><i class="fa fa-comment-o"></i>写消息</a>
         </div></div>
          
            {if $list}     
			<form id="Form">
            <ul class="list-group">
    			
              
  				{foreach $list $value}
                {php} $message=unserialize($value['lastmessage']);{/php}
                <a href="{echo U('/member/dialog/show/id/'.$value['activity'])}" class="list-group-item">
                 
                <div class="row">

                <div class="col-lg-1">
                    <div class="thumbnail" style="margin:0px;" title="{echo $message['fromname']}">
                     {echo GetAvatarSimple($message['fromuid'],48)}
                    </div>
                 </div>
                 
                 <div class="col-lg-10">
                    

                    <h4 class="list-group-item-heading"><label>
                     	 <input type="checkbox" name="checkbox[]" value="{echo $value['id']}" style="display:none">
                      	<span class="text checkbox"></span></label> 发给 {echo $message['toname']}：{echo $message['content']}</h4>
                    
                    	
                	
                    <p class="list-group-item-text">共有{echo $value['iscount']}条 {echo FormatDate("Y/m/d H:i:s",$value['lasttime'])}</p>
                    </div>
                    
    
                    <div class="col-lg-1">
                    <span class="badge{if $value['isread']>0} badge-orange{/if}" title="未读{echo $value['isread']}条">{echo $value['isread']}</span>
                    </div>
                      </div>
                  </a>
                  {/foreach}
                
              
              
                      
            </ul>
            <input name="datatype" type="hidden" value="json" />
            </form>
               
          	<div class="row DTTTFooter">
            
            <div class="col-sm-6">
          
              <label>
                <input type="checkbox" id="CheckAll" style="display:none">
                <span class="text">全选</span></label>
            </div>
           
            
            <div class="col-sm-6 text-right">
              <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
                <ul class="pagination">
                  {if $page}{echo $page}{/if}
                </ul>
              </div>
            </div>
          </div>
      
            <button class="btn btn-darkorange" type="submit" onclick="AllConfirm('#Form','{echo U('/post/dialog/delete')}')"><i class="fa fa-trash-o"></i>删除</button>
            {else}
            <ul class="list-group">
            	<div>暂无消息</div>
            </ul>
            {/if}          
          </div>
      </div>
      
  
    </div>
  </div>
</div>
     
{template Public:Page:footer}